package com.train.system.api;

import com.train.common.constants.ApiConstants;
import com.train.common.resp.CommonResp;
import com.train.system.api.fallback.TrainCarriageApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * trainCarriage Facade 接口
 * @author baitiaojun
 * @createDate 2025-02-20 18:52:37
 */
@FeignClient(
        contextId = "trainCarriageFacade",
        name = ApiConstants.SYSTEM_NAME,
        path = ApiConstants.SYSTEM_PREFIX,
        fallback = TrainCarriageApiFallback.class)
public interface TrainCarriageApi {

    String PREFIX = "/train-carriage";

    @PostMapping(PREFIX + "/listByTrainCodes")
    CommonResp getTrainCarriageListByTrainCodes(@RequestBody List<String> trainCodes);
}
